/**
 * Copyright (C) 2013 DaiKit.com - daikit4gxt module (admin@daikit.com)
 *
 *         Project home : http://code.daikit.com/daikit4gxt
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.daikit.daikit4gxt.client.utils.miscs;

import com.google.gwt.i18n.client.DateTimeFormat;


/**
 * Date formatter. Use one of the following static attributes in the constructor (or given any other pattern you want)<br>
 * <br>
 * 
 * {@value #DATE_FORMAT_2} <br>
 * {@value #DATE_FORMAT}<br>
 * {@value #DATE_WITH_TIME_FORMAT_2} <br>
 * {@value #DATE_WITH_TIME_FORMAT}
 * 
 * @author tcaselli
 * @version $Revision$ Last modifier: $Author$ Last commit: $Date$
 */
public class DkDateFormat extends DateTimeFormat
{

	/**
	 * yyyy-MM-dd HH:mm:ss
	 */
	public static final String DATE_WITH_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";

	/**
	 * yyyy-MM-dd
	 */
	public static final String DATE_FORMAT = "yyyy-MM-dd";

	/**
	 * HH:mm:ss
	 */
	public static final String TIME_FORMAT = "HH:mm:ss";

	/**
	 * MM/dd/yy
	 */
	public static final String DATE_FORMAT_2 = "MM/dd/yy";

	/**
	 * MM/dd/yy HH:mm:ss
	 */
	public static final String DATE_WITH_TIME_FORMAT_2 = "MM/dd/yy HH:mm:ss";

	/**
	 * Default constructor with {@value #DATE_FORMAT}
	 */
	public DkDateFormat()
	{
		this(DATE_FORMAT);
	}

	/**
	 * Constructor with any date pattern. Some sample ones are defined as static variables of this class.
	 * 
	 * @param pattern
	 *           the date pattern
	 */
	public DkDateFormat(final String pattern)
	{
		super(pattern);
	}

}
